package com.example.qingyiapp.ui.activity.fragment.fragment_FindUI.adapter;

import android.support.annotation.Nullable;
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentPagerAdapter;

import java.util.ArrayList;

/**
 * Creadted by Met·Wang on 2019/9/17 14:14
 * Describe: NullPointerException Write
 */
public class ChoicenessfragmentAdapter extends FragmentPagerAdapter {

    ArrayList<Fragment> fragments;

    public ChoicenessfragmentAdapter(FragmentManager fm, ArrayList<Fragment> fragments) {
        super(fm);
        this.fragments = fragments;

    }

    @Override
    public Fragment getItem(int i) {
        return fragments.get(i);
    }

    @Override
    public int getCount() {
        return fragments.size();
    }

    @Override
    public float getPageWidth(int position) {
        return 0.85f;
    }
}

